<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>维修员调派单</title>
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>


<div class="ricoh_content_k">
  <div class="ricoh_content_in" style="padding-left:38px;">
     <div class="searchmore">
         <div class="searchmoretop"></div>
          <div class="fr searchmoreright"></div>
          <div class="fl searchmoreleft"></div>
          <div class="fl searchmoretitle">维修员调派单</div>
          
          <form action="assign_saveAssignRecord.action" method="post" onsubmit="return validation();">
          
	          <div style="padding-top:30px;_padding-top:3px;padding-left:30px;">
	          
	          		<div class="inform_guest_k">
	          			 <div class="inform_guest" style="width:28%">
		                	  <label>客户名：</label>
		                          <s:select list="customers" name="assignRecord.unitName" id="unitName" listKey="unitName" listValue="%{unitName}" headerKey="" headerValue="请选择客户" theme="simple"></s:select>
	                     </div>
	                     
	                     <div class="inform_guest" style="width:28%">
		                      <label>客户简称：</label>
		                        <input type="text" name="assignRecord.unitForShort" id="unitForshort" maxlength="25"/>
	                    </div>
	          		
	          			<div class="inform_guest" style="width:28%">
		                      <label>联系方式：</label>
		                        <input type="text" name="assignRecord.contactWay" id="contactWay" maxlength="25"/>
	                    </div>
	                	
	                </div>
	                
	            	<div class="inform_guest_k">
	                	<div class="inform_guest" style="width:28%">
		                	  <label>地址：</label>
		                        <input type="text" name="assignRecord.address" id="address" maxlength="50"/>
	                     </div>
	                     
	                     <div class="inform_guest" style="width:28%">
		                      <label>联系人：</label>
		                        <input type="text" name="assignRecord.contactor" id="contactor" maxlength="25"/>
	                    </div>
	            	</div>
	            	
	            	<div class="inform_guest_k">
	                	<div class="inform_guest" style="width:28%">
	                	  <label>机型：</label>
	                      	  <s:select list="machines" name="assignRecord.machineModel" id="machineModel" listKey="machineModel" listValue="%{machineModel}" headerKey="" headerValue="请选择机型" theme="simple"></s:select>
	                     </div>
	                     <div class="inform_guest" style="width:28%">
	                      <label>机号：</label>
	                      <input type="text" name="assignRecord.machineNo" id="machineNo" maxlength="50"/>
	                    </div>
	            	</div>
	            	
	           		<div class="inform_guest_k">
	           		
		           	  	<div class="inform_guest" style="width:28%">
		                      <label>作业日：</label>
		                      	  <input name="workday" type="text" id="workday" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
											onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"></input>
						</div>
						
	                    <div class="inform_guest" style="width:28%">
	                      <label>作业人员：</label>
	                      	<s:select list="maintenanceMen" name="assignRecord.repairman" id="repairman" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择" theme="simple"></s:select>
	              		</div>
	              		
	              		<div class="inform_guest" style="width:28%">
	                      <label>作业内容：</label>
	                      	<select name="assignRecord.content" id="content">
		                	    <option value="">请选择</option>
		                	    <option value="1">定期保养</option>
		                	    <option value="2">修理</option>
		                	    <option value="3">定期修理</option>
		                	    <option value="4">继续作业</option>
		                	    <option value="5">零件更换</option>
		                	    <option value="6">炭粉更换</option>
		                	    <option value="7">说明</option>
		                	    <option value="8">合同</option>
		                	    <option value="9">机器安装</option>
		                	    <option value="10">搬回修理</option>
		                	    <option value="11">送货</option>
		                	    <option value="12">其它</option>
		   	                  </select>
	              		</div>
	                </div>
	                
		            <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:28%">
		           	    <label>需到达时间：</label>
		   	            	  <input name="reachTime" type="text" id="reachTime" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="25"
											onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"></input>
		           	  </div>
		           	  
		              <div class="inform_guest" style="width:28%">
		                 <label>需完成时间：</label>
		                      <input name="completeTime" type="text" id="completeTime" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="25"
											onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"></input>
		              </div>
		            </div>
		        
		            
		            <div class="inform_guest_k">
		           	  <div class="inform_guest" style="width:97%">
		           	    <label>备注：</label>
		                	  <input type="text" name="assignRecord.remark" id="remark"  style="width:350px;" maxlength="100"/>
		         	  </div>
		            </div>
		            
		            <div class="inform_guest_k">
			          	<div class="inform_guest" style="width:25%;margin-left:100px">
			            	<input type="submit" value="保存" class="send_btn"/>
			            </div>	
			        </div>
	            
	                <div class="clear"></div>
	          </div>
           
         </form>
         
           
         <div class="clear searchmorebottom"></div>
         </div>
  </div>
</div>

</div>
</div>
<jsp:include page="../footer.jsp"></jsp:include>
</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
	ddtabmenu.definemenu("ddtabs2", 3);

	$(document).ready(function(){
		if(${statusTemp} == true){
			alert("添加成功");
		}
	});

	function validation(){
		if($("#unitName").val() == ""){
			alert("请选择客户名");
			return false;
		}else if($("#unitForshort").val() == ""){
			alert("请填写用户简称");
			return false;
		}else if($("#contactWay").val() == ""){
			alert("请填写联系方式");
			return false;
		}else if($("#address").val() == ""){
			alert("请填写地址");
			return false;
		}else if($("#contactor").val() == ""){
			alert("请填写联系人");
			return false;
		}else if($("#contactWay").val() == ""){
			alert("请填写电话");
			return false;
		}else if($("#address").val == ""){
			alert("请填写地址");
			return false;
		}else if($("#machineModel").val() == ""){
			alert("请选择机型");
			return false;
		}else if($("#machineNo").val() == ""){
			alert("请填写机号");
			return false;
		}else if($("#workday").val() == ""){
			alert("请选择作业日");
			return false;
		}else if($("#content").val() == ""){
			alert("请选择作业内容");
			return false;
		}else if($("#reachTime").val() == ""){
			alert("请选择需要到达的时间");
			return false;
		}else if($("#completeTime").val() == ""){
			alert("请选择需要完成的时间");
			return false;
		}else if($("#remark").val() == ""){
			alert("请填写备注");
			return false;
		}else{
			return true;
		}
	}
</script>
</html>
